<div class="row-fluid">
	<div class="span2"></div>
	<div class="span8">
	    <p class="lead text-center demo-panel-title"><?php echo __("Upload"); ?></p>
		<form action="<?php echo $this->webroot;?>UploadXml/upload/file" method='post' enctype='multipart/form-data' name='formFile'>
			<div class="attach-form">
			    <div class="control-group">
				    <input required  type="hidden" class="" value="<?php echo $attachTipo ?>" placeholder="<?php echo __('Attach tipo')?>"  name="attachTipo" >
					<input type='file' name='attach' />
			        <button type="submit" class="btn btn-default btn-block" ><?php echo __("UPLOAD FILE"); ?></button>
			    </div>
			</div>
		</form>
		<form action="<?php echo $this->webroot;?>UploadXml/upload/url" method='post' name='formUrl' >
			<div class="attach-form">
			    <div class="control-group">
				    <input required  type="hidden" class="" value="<?php echo $attachTipo ?>" placeholder="<?php echo __('Attach tipo')?>"  name="attachTipo" >
				    <input type="text" style="width: 100%;" class="" value="" placeholder="<?php echo __('Url')?>"  name="url" >
			        <button type="submit" class="btn btn-default btn-block" ><?php echo __("UPLOAD URL"); ?></button>
			    </div>
			</div>
		</form>
	</div>
	<div class="span2"></div>
</div>
<div class="row-fluid">
	<div class="span2"></div>
	<div class="span8">
	    <p class="lead text-center demo-panel-title"><?php echo __("Xml"); ?></p>
        <?php if (count($xmls)>0) { ?>
            <table class="table table-hover prestazioni">
	              <thead>
	                <tr>
	                  <th></th>
	                  <th></th>
	                  <th><?php echo  __("id"); ?></th>
	                  <th><?php echo __("filename"); ?></th>
	                  <th><?php echo __("path dinamico"); ?></th>
	                  <th><?php echo __("attach tipo"); ?></th>
	                  <th><?php echo __("dimensione"); ?></th>
	                  <th><?php echo __("tipo file"); ?></th>
	                  <th><?php echo __("utente inserimento"); ?></th>
	                  <th><?php echo __("data inserimento"); ?></th>
	                  <th><?php echo __("stato"); ?></th>
	                  <th><?php echo __("errore"); ?></th>
	                </tr>
	              </thead>
	              <tbody>
	                  <? foreach ($xmls as $key => $xml) { ?>
		              	<tr>
		                  <td><?php echo $this->Acl->link("<i class='icon-trash'></i>",array("controller" => "UploadXml", "action" => "delete", $xml["Attach"]["id"], $xml["Xml"]["id"]), array('data-confirm'=>'true','class'=>'btn','escape'=>false));  ?> </td>
		                  <td><?php echo $this->Acl->link("<i class='icon-th'></i>",array("controller" => "Import", "action" => "xml", $xml["Xml"]["id"]), array('class'=>'btn','escape'=>false));  ?> </td>
		                  <td><?php echo $xml["Xml"]["id"]; ?></td>
		                  <td><?php echo $xml["Attach"]["file_name"]; ?></td>
		                  <td><?php echo $xml["Attach"]["path_dinamico"]; ?></td>
		                  <td><?php echo $xml["Attach"]["attach_tipo"]; ?></td>
		                  <td><?php echo $xml["Attach"]["dimensione"]; ?></td>
		                  <td><?php echo $xml["Attach"]["tipo"]; ?></td>
		                  <td><?php echo $xml["Attach"]["ut_ins"]; ?></td>
		                  <td><?php echo $xml["Attach"]["dt_ins"]; ?></td>
		                  <td><?php echo Xml::$STATO[$xml["Xml"]["stato"]]; ?></td>
		                  <td><?php echo $xml["Xml"]["errore"]; ?></td>
		                </tr>
    					<?php } ?>
	              </tbody>
	        </table>  
        <?php }else{ ?>
                <label class="text-center"><i class="icon-frown"></i> Non ci sono file xml caricati.</label>       
        <?php }?>
	</div>
	<div class="span2"></div>
</div>